import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    token: "",
    info: "",
    // socket: null
  },
  mutations: {
    addToken(state, token) {
      state.token = token
    },
    addInfo(state, info) {
      state.info = info
    },
    // connectWs(state) {
    //   let wsUrl = "ws://127.0.0.1:8081/w?id=" + state.info.id;
    //   state.socket = new WebSocket(wsUrl);
    // }
  },
  actions: {
  },
  modules: {
  }
})
